package com.panfeng.xcloud.boss.provider.member.web.vo.response;

import com.panfeng.xcloud.boss.provider.member.dto.request.ActiveInfoRespDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "一级好友的活跃度")
public class ChildActiveInfoRespDTO extends ActiveInfoRespDTO implements Comparable<ChildActiveInfoRespDTO>, Serializable {
    @ApiModelProperty("注册时间")
    Date createTime;
    @ApiModelProperty("上次活跃时间")
    Date lastTime;
    @ApiModelProperty("用户id")
    String userId;
    @ApiModelProperty("用户别名")
    String nickname;
    @ApiModelProperty("头像")
    String avatar;
    @ApiModelProperty("手机号")
    String mobile;
    @ApiModelProperty("邮箱")
    String email;
    @ApiModelProperty("当前活跃度等级")
    String userActiveLevel;
    @ApiModelProperty("当前活跃度")
    BigDecimal totalActive;
    @ApiModelProperty("大区活跃度")
    BigDecimal largeAreaActive;
    @ApiModelProperty("小区活跃度")
    BigDecimal smallAreaActive;
    @ApiModelProperty("ocr实名认证状态，-1： 未认证 1： 认证通过 2 ：认证不通过")
    Integer ocrAuthStatus;
    @ApiModelProperty("历史最高活跃度等级")
    String maxActiveLevel;
    @ApiModelProperty("团队总人数")
    Integer totalTeamMembers;
    public void copyFromActiveInfoRespBean(ActiveInfoRespDTO activeInfoRespDTO){
        this.userId = activeInfoRespDTO.getUserId();
        this.nickname = activeInfoRespDTO.getNickname();
        this.avatar = activeInfoRespDTO.getAvatar();
        this.mobile = activeInfoRespDTO.getMobile();
        this.email = activeInfoRespDTO.getEmail();
        this.userActiveLevel = activeInfoRespDTO.getUserActiveLevel();
        this.totalActive = activeInfoRespDTO.getTotalActive();
        this.largeAreaActive = activeInfoRespDTO.getLargeAreaActive();
        this.smallAreaActive = activeInfoRespDTO.getSmallAreaActive();
        this.ocrAuthStatus = activeInfoRespDTO.getOcrAuthStatus();
        this.maxActiveLevel = activeInfoRespDTO.getMaxActiveLevel();
        this.totalTeamMembers = activeInfoRespDTO.getTotalTeamMembers();
    }


    @Override
    public int compareTo(ChildActiveInfoRespDTO childActiveInfoRespBean) {
        return this.userId.compareTo(childActiveInfoRespBean.userId);
    }
}
